import moment from 'moment'

window.moment = moment

const kylinUtil = {
  getStrDateBefore: (days) => moment().subtract(days, 'days').format('YYYY-MM-DD'),
  getStrCurrDate: () => moment().format('YYYY-MM-DD'),
  getDefaultStartDateStr: () => moment().subtract(6, 'days').format('YYYY-MM-DD'),
  getDefaultEndDateStr: () => moment().format('YYYY-MM-DD'),
  formatDate: (date) => moment(date).format('YYYY-MM-DD HH:mm:ss')
}

export default kylinUtil
